package mysql

import (
	"gitee.com/xuxinzhi2206/corehub/database/mysql"
	"gorm.io/gorm"

	"gitee.com/enjoy_5/enjoy-wallet/model/address"
	"gitee.com/enjoy_5/enjoy-wallet/model/wallet"
)

func NewAutoMigrate() error {
	return mysql.WithMysql(func(db *gorm.DB) error {
		return db.AutoMigrate(new(wallet.UserBalance), new(wallet.UserConsumptionDetails), new(wallet.RechargeRecord), new(address.Address))
	})
}
